package de.duester.genealogy.model;

public abstract class GenealogicalObject {
	protected Long id;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Override
	public boolean equals(Object o) {
		if (!getClass().isInstance(o))
			return false;
		GenealogicalObject go = (GenealogicalObject) o;
		if (id != null && go.id != null)
			return id.equals(go.id);
		return equalsByContent(o);
	}

	public abstract boolean equalsByContent(Object o);
}
